#ifndef PM_TAG_H_INCLUDED
#define PM_TAG_H_INCLUDED

#include "pm/dbobject.h"
#include <wx/colour.h>

namespace pm
{
	
class Tag : public db::Object
{
	wxString m_name;
	wxColour m_colour;
	
public:
	static const wxString TABLE_NAME;

public:
	Tag() { }
	Tag(wxSQLite3ResultSet& res);
	
	const wxString& name() const { return m_name; }
	void name(const wxString& n) { m_name = n; }
	
	const wxColour& colour() const { return m_colour; }
	void colour(const wxColour& c) { m_colour = c; }

	// DB
	virtual db::update_value_type prepare_insert(wxSQLite3Database& db);
	virtual db::update_value_type prepare_update(wxSQLite3Database& db);
};

typedef std::list<Tag> ListTag;

} // namespace pm

#endif // PM_TAG_H_INCLUDED
